//父类
function Animal(name) {
  this.name = name
}

Animal.prototype.showName = function() {
  console.log('名字是: ' + this.name);
}

// 子类
function Dog(name, color) {
  Animal.call(this, name)// 继承属性 
  this.color = color
}
Dog.prototype = new Animal()
Dog.prototype.constructor = Dog
//上述为组合继承 


let d1 = new Dog('wangcai', 'white')
console.log(d1);
d1.sho